package Others.DesignPattern.StrategyPattern.Pattern.Strategy;


public class DiscountCollectMoney extends DiscountStrategy {

    private final double discount;//加了final相当于，不能够再给这个属性赋值了--不建议加

    public DiscountCollectMoney(double totalMoney,double discount) {
        super(totalMoney);
        this.discount = discount;
    }

    @Override
    public void getDiscountPrice() {
        System.out.println("打折收费：消费金额为" + totalMoney * discount);
    }

}
